package com.leadingsoft.pwxk.converter;

import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.PermitApplyMonthDto;
import com.leadingsoft.pwxk.model.PermitApplyMonth;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class PermitApplyMonthConverter extends AbstractConverter<PermitApplyMonth, PermitApplyMonthDto> {

	@Override
	protected PermitApplyMonthDto toDtoActual(PermitApplyMonth model) {
		// TODO Auto-generated method stub

		PermitApplyMonthDto dto = new PermitApplyMonthDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setMonthtype(model.getMonthtype());
		dto.setSqeightmonth(model.getSqeightmonth());
		dto.setSqelevenmonth(model.getSqelevenmonth());
		dto.setSqfivemonth(model.getSqfivemonth());
		dto.setSqfourmonth(model.getSqfourmonth());
		dto.setSqmonthhj(model.getSqmonthhj());
		dto.setSqninemonth(model.getSqninemonth());
		dto.setSqonemonth(model.getSqonemonth());
		dto.setSqsevenmonth(model.getSqsevenmonth());
		dto.setSqsixmonth(model.getSqsixmonth());
		dto.setSqtenmonth(model.getSqtenmonth());
		dto.setSqthreemonth(model.getSqthreemonth());
		dto.setSqtwelfmonth(model.getSqtwelfmonth());
		dto.setSqtwomonth(model.getSqtwomonth());
		dto.setSqyear(model.getSqyear());
		dto.setWrwid(model.getWrwid());
		dto.setWrwname(model.getWrwname());

		return dto;
	}

	public void copyProperties(PermitApplyMonth model, PermitApplyMonthDto dto) {
		// model.setId(dto.getId());
		// model.setDataid(dto.getDataid());

		model.setMonthtype(dto.getMonthtype());
		model.setSqeightmonth(dto.getSqeightmonth());
		model.setSqelevenmonth(dto.getSqelevenmonth());
		model.setSqfivemonth(dto.getSqfivemonth());
		model.setSqfourmonth(dto.getSqfourmonth());
		model.setSqmonthhj(dto.getSqmonthhj());
		model.setSqninemonth(dto.getSqninemonth());
		model.setSqonemonth(dto.getSqonemonth());
		model.setSqsevenmonth(dto.getSqsevenmonth());
		model.setSqsixmonth(dto.getSqsixmonth());
		model.setSqtenmonth(dto.getSqtenmonth());
		model.setSqthreemonth(dto.getSqthreemonth());
		model.setSqtwelfmonth(dto.getSqtwelfmonth());
		model.setSqtwomonth(dto.getSqtwomonth());
		model.setSqyear(dto.getSqyear());
		model.setWrwid(dto.getWrwid());
		model.setWrwname(dto.getWrwname());
	}

}
